package com.ucar.train.dao;

import com.ucar.train.dto.CarDTO;
import com.ucar.train.vo.CarVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CarMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CarDTO record);

    int insertSelective(CarDTO record);

    CarDTO selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CarDTO record);

    int updateByPrimaryKey(CarDTO record);

    /**
    * @Description 根据门店id查到门店里的车
    * @author helingang
    * @param  storeId
    * @createDate 2019/8/14
    **/
    List<CarDTO>selectCarByStoreId(@Param(value = "storeId") String storeId);

    /**
    * @Description 根据调度情况修改车辆的门店id
    * @author Helingang
    * @param  carIdList，storeId
    * @createDate 2019/8/14
    **/
    Integer updateCarOfStoreIdAfterSchedul(@Param(value = "carIdList") List<String> carIdList, @Param(value = "storeId") String storeId);


    /**
     * @Author zhoujinmu
     * @Description 通过订单数量，发配车
     * @Date 2019/8/14 16:55
     */
    List<String> selectCarIdbyType(@Param("type") String type,@Param("orderNum") Integer orderNum);

    /**
     * 功能描述: <br>
     * 〈通过carID查询车辆信息〉
     * @Param: [carID]
     * @Return: com.ucar.train.dto.CarDTO
     * @Author: XuMingZhi
     * @Date: 2019/8/19 12:47
     */
    CarDTO selectCarDTOByCarId(String carID);

    int updateByCarId( CarDTO carDTO);

    List<CarDTO>selectAllCar();


}